# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: dorphell <dorphell@archlinux.org>

pkgname=tcpdump
pkgver=4.9.2
pkgrel=1
pkgdesc='Powerful command-line packet analyzer'
url='http://www.tcpdump.org/'
arch=('x86_64')
license=('BSD')
depends=('libpcap' 'libcap-ng' 'openssl')
#source=("http://www.tcpdump.org/release/${pkgname}-${pkgver}.tar.gz"{,.sig})
source=("https://sources.archlinux.org/other/packages/tcpdump/${pkgname}-${pkgver}.tar.gz"{,.sig})
validpgpkeys=('1F166A5742ABB9E0249A8D30E089DEF1D9C15D0D')
sha256sums=('798b3536a29832ce0cbb07fafb1ce5097c95e308a6f592d14052e1ef1505fe79'
            'SKIP')

build() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	./configure \
		--prefix=/usr \
		--sbindir=/usr/bin \

	make
}

check() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	make check
}

package() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	make DESTDIR="${pkgdir}" install
	install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
	rm -f "${pkgdir}"/usr/bin/tcpdump.${pkgver}
}
